package com.ranjiaqi.thread03;


/**
 * @ClassName TestThreadLevel
 * @Description TODO
 * @Author hp
 * @Date 2021/6/28 18:06
 * @Version 1.0
 **/
public class TestThreadLevel {
    public static void main(String[] args) {
        //实例化线程接口对象
        SubThread run = new SubThread();
        //调用线程的构造方法
        Thread thread = new Thread(run);
        Thread thread1 = new Thread(run);
        //设置线程的优先级
        thread.setPriority(Thread.MAX_PRIORITY);
        thread1.setPriority(Thread.MIN_PRIORITY);
        thread.start();
        thread1.start();
    }

}
